/***************************************************************
*  Copyright (c) 2007 by GroupMe! Team (www.groupme.net)
*  All rights reserved.
*
*  This file is part of the GroupMe! Project. Source code of 
*  this project is closed and redistribution of this code is
*  prohibited. 
*  
*  Contact: http://www.groupme.net
*
*  This copyright notice MUST APPEAR in all copies of the file!
***************************************************************/
package net.groupme.logging.model;

import java.sql.Timestamp;

import net.groupme.model.User;

/**
 * created on Sep 20, 2007
 * 
 * This is a genral super class for LogEvents..
 * 
 * @author Fabian Abel, <a href="mailto:abel@l3s.de">abel@l3s.de</a>
 * @author last edited by: $Author: fabian $
 * 
 * @version $Revision: 1.2 $ $Date: 2007-09-20 16:16:52 $
 */
public abstract class AbstractLogEvent implements LogEvent {

	private User user = null;
	private ActionIdentifier actionID = null;
	private Timestamp timestamp = null;
	private int id = -1;
	
	/**
	 * Creates a new AbstractLogEvent instance.
	 * @param user the user
	 * @param actionID ID of fulfilled action
	 */
	public AbstractLogEvent(User user, ActionIdentifier actionID) {
		super();
		this.user = user;
		this.actionID = actionID;
	}
	
	/**
	 * Creates a new AbstractLogEvent instance.
	 * @param id the ID
	 * @param user the user
	 * @param actionID ID of fulfilled action
	 */
	public AbstractLogEvent(int id, User user, ActionIdentifier actionID) {
		super();
		this.user = user;
		this.actionID = actionID;
		this.id = id;
	}
	
	/* (non-Javadoc)
	 * @see net.groupme.logging.model.LogEvent#getID()
	 */
	public int getID() {
		return id;
	}

	/* (non-Javadoc)
	 * @see net.groupme.logging.model.LogEvent#setID(int)
	 */
	public void setID(int id) {
		this.id = id;
	}

	/* (non-Javadoc)
	 * @see net.groupme.logging.model.LogEvent#getActionID()
	 */
	public ActionIdentifier getActionID() {
		return actionID;
	}
	/* (non-Javadoc)
	 * @see net.groupme.logging.model.LogEvent#setActionID(net.groupme.logging.model.ActionIdentifier)
	 */
	public void setActionID(ActionIdentifier actionID) {
		this.actionID = actionID;
	}


	/* (non-Javadoc)
	 * @see net.groupme.logging.model.LogEvent#getUser()
	 */
	public User getUser() {
		return user;
	}
	/* (non-Javadoc)
	 * @see net.groupme.logging.model.LogEvent#setUser(net.groupme.model.User)
	 */
	public void setUser(User user) {
		this.user = user;
	}
	/* (non-Javadoc)
	 * @see net.groupme.logging.model.LogEvent#getTimestamp()
	 */
	public Timestamp getTimestamp() {
		return timestamp;
	}
	/* (non-Javadoc)
	 * @see net.groupme.logging.model.LogEvent#setTimestamp(java.sql.Timestamp)
	 */
	public void setTimestamp(Timestamp timestamp) {
		this.timestamp = timestamp;
	}
}
